package com.chinasi.dao.impl;

import java.util.List;

import org.apache.ibatis.session.RowBounds;

import com.chinasi.dao.BidSupvisionDao;
import com.chinasi.model.BidConsumer;
import com.chinasi.model.BidSupvision;
import com.chinasi.model.ConsumerBasic;
import com.chinasi.model.SupervisionBasic;
import com.chinasi.model.mvo.BidAgencyMvo;
import com.chinasi.model.mvo.BidConsultMvo;
import com.chinasi.model.mvo.BidConsumerMvo;
import com.chinasi.model.mvo.BidExpertMvo;
import com.chinasi.model.mvo.BidIntegrationMvo;
import com.chinasi.model.mvo.BidSupvisionMvo;
import com.caland.framework.core.annotation.Dao;
import com.caland.framework.core.page.Pager;
import com.caland.framework.dao.ibatis.impl.MyBatisBaseDaoImpl;

@Dao
public class BidSupvisionDaoImpl extends MyBatisBaseDaoImpl<BidSupvision, java.lang.String> implements BidSupvisionDao {

	private static final String SQL_PREFIX = "com.chinasi.model.BidSupvision.";
	@Override
	public List<BidSupvisionMvo> findRelationBid(BidSupvision searchBean,
			Pager pager) {
		RowBounds rowBounds = new RowBounds(pager.getStartRow(), pager.getPageSize());
		return this.getCurSqlSessionTemplate().selectList(SQL_PREFIX + "findRelationBid", searchBean, rowBounds);
	}
	@Override
	public int getRelationConsultTotalCount(SupervisionBasic supervision) {
		return this.getCurSqlSessionTemplate().selectOne(SQL_PREFIX + "getRelationConsultTotalCount", supervision);
	}
	@Override
	public List<BidConsultMvo> findRelationConsult(SupervisionBasic supervision,
			Pager pager) {
		RowBounds rowBounds = new RowBounds(pager.getStartRow(), pager.getPageSize());
		return this.getCurSqlSessionTemplate().selectList(SQL_PREFIX + "findRelationConsult", supervision, rowBounds);
	}
	@Override
	public int getRelationIntegratorTotalCount(SupervisionBasic supervision) {
		return this.getCurSqlSessionTemplate().selectOne(SQL_PREFIX + "getRelationIntegratorTotalCount", supervision);
	}
	@Override
	public List<BidIntegrationMvo> findRelationIntegrator(
			SupervisionBasic supervision, Pager pager) {
		RowBounds rowBounds = new RowBounds(pager.getStartRow(), pager.getPageSize());
		return this.getCurSqlSessionTemplate().selectList(SQL_PREFIX + "findRelationIntegrator", supervision, rowBounds);
	}
	@Override
	public int getRelationAgencyTotalCount(SupervisionBasic supervision) {
		return this.getCurSqlSessionTemplate().selectOne(SQL_PREFIX + "getRelationAgencyTotalCount", supervision);
	}
	@Override
	public List<BidAgencyMvo> findRelationAgency(SupervisionBasic supervision,
			Pager pager) {
		RowBounds rowBounds = new RowBounds(pager.getStartRow(), pager.getPageSize());
		return this.getCurSqlSessionTemplate().selectList(SQL_PREFIX + "findRelationAgency", supervision, rowBounds);
	}
	@Override
	public int getRelationConsumerTotalCount(SupervisionBasic supervision) {
		return this.getCurSqlSessionTemplate().selectOne(SQL_PREFIX + "getRelationConsumerTotalCount", supervision);
	}
	@Override
	public List<BidConsumerMvo> findRelationConsumer(
			SupervisionBasic supervision, Pager pager) {
		RowBounds rowBounds = new RowBounds(pager.getStartRow(), pager.getPageSize());
		return this.getCurSqlSessionTemplate().selectList(SQL_PREFIX + "findRelationConsumer", supervision, rowBounds);
	}
	@Override
	public int getRelationExpertTotalCount(SupervisionBasic supervision) {
		return this.getCurSqlSessionTemplate().selectOne(SQL_PREFIX + "getRelationExpertTotalCount", supervision);
	}
	@Override
	public List<BidExpertMvo> findRelationExpert(SupervisionBasic supervision,
			Pager pager) {
		RowBounds rowBounds = new RowBounds(pager.getStartRow(), pager.getPageSize());
		return this.getCurSqlSessionTemplate().selectList(SQL_PREFIX + "findRelationExpert", supervision, rowBounds);
	}
}
